<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改主播信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-anchor-edit" th:object="${teaAnchor}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">主播昵称，最短2个汉字，最长15个汉字，1个汉字相当于2个字符：</label>
                <div class="col-sm-8">
                    <input name="anchorName" th:field="*{anchorName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">主播微信号，如果未实名认证，需要先前往“小程序直播”小程序进行实名验证：</label>
                <div class="col-sm-8">
                    <input name="anchorWechat" th:field="*{anchorWechat}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">主播姓名：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">主播手机号：</label>
                <div class="col-sm-8">
                    <input name="phone" th:field="*{phone}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">主播身份证号：</label>
                <div class="col-sm-8">
                    <input name="idcar" th:field="*{idcar}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">主播微信小程序标识：</label>
                <div class="col-sm-8">
                    <input name="openId" th:field="*{openId}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "tea/anchor";
        $("#form-anchor-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-anchor-edit').serialize());
            }
        }
    </script>
</body>
</html>